using System;
using System.Collections.Generic;

namespace MesDashboardApi.Api.Models
{
    // 生产计划完成率数据
    public class PlanData
    {
        public string Name { get; set; } = "";
        public int Value { get; set; }
    }

    public class PlanConfig
    {
        public List<PlanData> Data { get; set; } = new();
        public List<string> Colors { get; set; } = new();
        public string Unit { get; set; } = "%";
    }

    // 设备运行状态数据
    public class DeviceData
    {
        public string Name { get; set; } = "";
        public int Value { get; set; }
    }

    public class DeviceConfig
    {
        public List<DeviceData> Data { get; set; } = new();
        public List<string> Color { get; set; } = new();
    }

    // 数值显示样式
    public class NumberStyle
    {
        public int FontSize { get; set; }
        public string Fill { get; set; } = "";
    }

    // 数值配置
    public class NumberConfig
    {
        public List<double> Number { get; set; } = new();
        public string Content { get; set; } = "";
        public NumberStyle Style { get; set; } = new();
    }

    // 生产概况数据
    public class ProductionConfig
    {
        public NumberConfig Count { get; set; } = new();
        public NumberConfig Target { get; set; } = new();
        public NumberConfig Rate { get; set; } = new();
    }

    // 生产线站点数据
    public class ProductionStation
    {
        public string Name { get; set; } = "";
        public bool Active { get; set; }
        public bool Warning { get; set; }
    }

    // 品质监控数据
    public class QualityConfig
    {
        public double Value { get; set; }
        public List<string> Colors { get; set; } = new();
        public int BorderWidth { get; set; }
        public int BorderGap { get; set; }
        public List<int> LineDash { get; set; } = new();
        public string TextColor { get; set; } = "";
    }

    // 告警信息数据
    public class AlarmInfo
    {
        public string Time { get; set; } = "";
        public string Device { get; set; } = "";
        public string Content { get; set; } = "";
        public string Level { get; set; } = "";
    }

    // 生产趋势数据
    public class TrendData
    {
        public List<string> Months { get; set; } = new();
        public List<int> Production { get; set; } = new();
        public List<int> Defects { get; set; } = new();
    }

    // 完整的仪表板数据
    public class DashboardData
    {
        public PlanConfig PlanConfig { get; set; } = new();
        public DeviceConfig DeviceConfig { get; set; } = new();
        public ProductionConfig ProductionConfig { get; set; } = new();
        public List<ProductionStation> ProductionStations { get; set; } = new();
        public QualityConfig QualityConfig { get; set; } = new();
        public List<AlarmInfo> AlarmList { get; set; } = new();
        public TrendData TrendData { get; set; } = new();
        public string CurrentTime { get; set; } = "";
    }
} 